﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="SelectMainMedia.aspx.vb" Inherits="Slxt.SelectMainMedia" %>
<%@ Register TagPrefix="pomcnt" Namespace="Mysoft.PubProject.Business" Assembly="Mysoft.PubProject.Business" %>
<%@ Register TagPrefix="mnu" Namespace="Mysoft.Map.Application.Menus" Assembly="Mysoft.Map.Application.Components" %>
<%@ Register TagPrefix="cnt" Namespace="Mysoft.Map.Application.Controls" Assembly="Mysoft.Map.Application.Components" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>

<head id="Head1" runat="server">
    <title>选择媒体大类</title>
		<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1" />
		<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1" />
		<meta name="vs_defaultClientScript" content="JavaScript" />
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
		<link href="/_grid/map_grid.css" type="text/css" rel="stylesheet" />
		<link href="/_nav/menu.css" type="text/css" rel="stylesheet" />
		<script language="javascript" type="text/javascript" src="/_common/scripts/global.js"></script>
		<link href="/_forms/styles/form.css" type="text/css" rel="stylesheet" />
		<link href="/_controls/find/find.css" type="text/css" rel="stylesheet" />
		<link href="/_common/styles/global.css" type="text/css" rel="stylesheet" />
		<script language="javascript" type="text/javascript" src="/_controls/settings.aspx"></script>
		<script language="javascript" type="text/javascript" src="/_controls/util/util.js"></script>
		<script language="javascript" type="text/javascript" src="/_controls/datetime/date.js"></script>
		<script language="javascript" type="text/javascript" src="/_controls/number/number.js"></script>
		<script language="javascript" type="text/javascript" src="/_nav/menu.js"></script>
		<script language="javascript" type="text/javascript" src="/_grid/rep_grid.js"></script>
		<script language="javascript" type="text/javascript" src="/Slxt/js/Public.js"></script>
		<script language="javascript" type="text/javascript" src="/_controls/lookup/map_lookup.js"></script>
        <script language="javascript" type="text/javascript" src="/_controls/lookup/map_LookupDialogs.js"></script>
		<script language="javascript" type="text/javascript">
		    function window.onload() {
		    
		    }
		
		    // 返回选择媒体大类名称
		    function SelectItem(){
		        var aryTr = appGrid.frameElement.getSelected();
		        if (!aryTr) {
		            alert("请选择媒体大类！");
		            return;
		        }
		        var strGUIDList = "";
		        var strNameList = "";
		        for(var i = 0; i < aryTr.length;i++){
		            strGUIDList += ";" + aryTr[i].oid;
		            strNameList += ";" + aryTr[i].MainMediaName;
		        }

                var ls = new LookupItems();
                var li = new LookupItem();
                li.id = strGUIDList.substr(1);
                li.name = strNameList.substr(1);
                li.html = null;           
                li.values = null;
                li.keyValues = null;
                ls.items.push(li);

                window.returnValue = ls;
                window.close();
		    }
		</script>
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<table width="100%" cellspacing="0" cellpadding="0" height="100%">
			<tr>
				<td class="main" valign="top">
					<TABLE style="TABLE-LAYOUT: fixed; VERTICAL-ALIGN: text-bottom" height="100%" cellSpacing="0"
						cellPadding="0" width="100%">
						<TR>
							<TD colSpan="2"><table style="TABLE-LAYOUT: fixed;FONT-SIZE: 9pt" height="100%" cellSpacing="0" cellPadding="0"
									width="100%">
									<tr height="25">
										<td>
											<mnu:AppGridMenu id="appGridMenu" runat="server" />
										</td>
									</tr>
									<tr>
										<td style="background:white; border:solid 1px #cccccc">
											<cnt:AppGrid id="appGrid" runat="server"  filter="<filter />" AllowPaging="false" SelectByCheckBox="true" MultiSelect="true"/>
										</td>
									</tr>
								</table>
							</TD>
						</TR>
					</TABLE>
				</td>
			</tr>
			<TR height="40">
				<TD class="buttons" colSpan="2">
					<TABLE style="TABLE-LAYOUT: fixed; WIDTH: 100%; HEIGHT: 100%" cellSpacing="0" cellPadding="0">
						<TR>
							<TD align="right">
								<BUTTON style="WIDTH: 70px" onclick="SelectItem();" name="btnNext1" type="button">确 
									定</BUTTON>&nbsp;&nbsp;<BUTTON style="WIDTH: 70px" onclick="window.returnValue=null;parent.window.close();" name="btnClose" value="取 消"
									type="button">取 消</BUTTON>
							</TD>
						</TR>
					</TABLE>
				</TD>
			</TR>
		</table>
	</body>
</HTML>